﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<Style x:Key="MainScrollViewerStyle" TargetType="ScrollViewer">
		<Setter Property="HorizontalContentAlignment" Value="Left"/>
		<Setter Property="VerticalContentAlignment" Value="Top"/>
		<Setter Property="VerticalScrollBarVisibility" Value="Visible"/>
		<Setter Property="Padding" Value="4"/>
		<!--<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="BorderBrush" Value="Transparent"/>-->
        <Setter Property="BorderBrush" Value="CornflowerBlue"/>
        <Setter Property="BorderThickness" Value = "0,2,0,0"/>
        <Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ScrollViewer">
					<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
						<Grid Background="{TemplateBinding Background}">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="*"/>
								<ColumnDefinition Width="Auto"/>
							</Grid.ColumnDefinitions>
							<Grid.RowDefinitions>
								<RowDefinition Height="*"/>
								<RowDefinition Height="Auto"/>
							</Grid.RowDefinitions>
							<ScrollContentPresenter x:Name="ScrollContentPresenter" Cursor="{TemplateBinding Cursor}" Margin="{TemplateBinding Padding}" ContentTemplate="{TemplateBinding ContentTemplate}" Grid.Column="1"/>
							<Rectangle Fill="#FFE9EEF4" Grid.Column="1" Grid.Row="1"/>
							<ScrollBar x:Name="VerticalScrollBar" IsTabStop="False" Margin="0,-1,-1,-1" Width="18" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="0" Grid.Row="0" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Value="{TemplateBinding VerticalOffset}" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}"/>
							<ScrollBar x:Name="HorizontalScrollBar" IsTabStop="False" Height="18" Margin="-1,0,-1,-1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Value="{TemplateBinding HorizontalOffset}" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}"/>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>
